package com.yunsoft.notice.service.config;

import com.fld.platform.db.mybatis.config.MybatisPackageConfigurer;
import org.springframework.stereotype.Component;

/**
 * mybatis配置
 * @author yangyunfeng
 * @Date 2023-02-16 20:59:25
 *
 */
@Component
public class MybatisScanPackageConfigurer implements MybatisPackageConfigurer {

	/**
	 * 自动扫描mapper目录,扫描basePackage下所有以@MyBatisRepository标识的 接口
	 * This property lets you set the base package for your mapper interface files.
	 * <p>
	 * You can set more than one package by using a semicolon or comma as a separator.
	 * <p>
	 * Mappers will be searched for recursively starting in the specified package(s).
	 *
	 * @param
	 */
	@Override
	public String getBasePackage() {
		return "com.yunsoft.notice.service.db.mapper";
	}

	/***
	 * 自动扫描entity目录, 省掉Configuration.xml里的手工配置
     *
     * <p>
     * Since 2.0.1, allow to specify a wildcard such as {@code com.example.*.model}.
     *
     * @param
     * @since 1.0.1
     */
	@Override
	public String getTypeAliasesPackage() {
		return "com.yunsoft.notice.service.db.entity";
	}

	/**
	 * 扫描通用枚举<br />
	 * 支持统配符 * 或者 ; 分割
	 * @return
	 */
	@Override
	public String getTypeEnumsPackage() {
		return "com.yunsoft.notice.service.db.enums";
	}

}
